import http from "../../utils/index"

/**
 * 查找可展示的菜单
 * @returns {*}
 */
export function menuList(){
    return http.get("api/sys/menu/menuList/0");
}

/**
 * 查找所有菜单
 * @returns {*}
 */
export function menuAll() {
    return http.get("api/sys/menu/menuAll");
}

/**
 * 分页查找菜单
 * @param param
 * @returns {*}
 */
export function pager(param = {}) {
    return http.post("api/sys/menu/pager", param);
}

/**
 * 查找详细
 * @param id
 * @returns {*}
 */
export function details(id) {
    return http.get("api/sys/menu/details/"+id)
}

/**
 * 保存
 * @param param
 * @returns {*}
 */
export function save(param = {}) {
    return http.put("api/sys/menu/save", param);
}

/**
 * 删除菜单
 * @param ids
 * @returns {*}
 */
export function remove(ids) {
    return http.delete("api/sys/menu/remove/"+ids);
}
